package com.sdp.right.db.sys_entity_field.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sdp.right.db.sys_entity_field.mapper.SysEntityFieldMapper;
import com.sdp.right.db.sys_entity_field.service.ISysEntityFieldService;
import com.sdp.right.entity.SysEntityField;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zsp
 * @since 2023-11-13
 */
@Service
@DS(value="right")
public class SysEntityFieldServiceImpl extends ServiceImpl<SysEntityFieldMapper, SysEntityField> implements ISysEntityFieldService {

	@Override
	public void removeSysEntityFieldByClassName(String className) {
		LambdaQueryWrapper<SysEntityField> queryWrapper = new LambdaQueryWrapper<>();
		queryWrapper.eq(SysEntityField::getEntityClassName, className);
		remove(queryWrapper);
		
	}

	@Override
	public List<SysEntityField> querySysEntityFieldByClassName(String className) {
		LambdaQueryWrapper<SysEntityField> queryWrapper = new LambdaQueryWrapper<>();
		queryWrapper.eq(SysEntityField::getEntityClassName, className);
		return list(queryWrapper);
	}

}
